<template>
	<view class="content">
		<view class="t-goods" v-if="goodsList&&goodsList.length>0">
			<view class="t-goods-item" v-for="(item,index) in goodsList" :key="index">
				<image class="t-goods-img" :src="item.goodsUrl"></image>
				<view class="t-goods-title t-text-oneline">{{item.goodsDesc}}</view>
				<view class="t-goods-score t-flex-row-s">
					<text>{{item.goodsScore}}</text>
					<text>积分</text>
				</view>
				<view class="t-dh t-flex-row" bindtap="toTips" hover-class="t-click-class">我要兑换</view>
			</view>
		</view>
		<view class="t-more t-flex-row">
			我也是有底线的哦~
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				goodsList: [{
						goodsUrl: '/static/goods/1.png',
						goodsDesc: '多功能晴雨伞一把',
						goodsScore: 1000
					},
					{
						goodsUrl: '/static/goods/2.png',
						goodsDesc: '万用充电线一条',
						goodsScore: 3000
					},
					{
						goodsUrl: '/static/goods/3.png',
						goodsDesc: '保温壶一个',
						goodsScore: 5000
					},
					{
						goodsUrl: '/static/goods/4.png',
						goodsDesc: '400ML水杯一个',
						goodsScore: 2000
					},
					{
						goodsUrl: '/static/goods/5.png',
						goodsDesc: '万用切到一把',
						goodsScore: 6000
					},
					{
						goodsUrl: '/static/goods/6.png',
						goodsDesc: '小巧手电筒一个',
						goodsScore: 1000
					},
					{
						goodsUrl: '/static/goods/7.png',
						goodsDesc: '800ML杯子一个',
						goodsScore: 7000
					},
					{
						goodsUrl: '/static/goods/8.png',
						goodsDesc: '600ML保温杯一个',
						goodsScore: 12000
					},
				]
			}
		},
		methods: {

		}
	}
</script>

<style scoped lang="scss">
	.t-click-class {
		opacity: 0.7;
	}

	.t-flex-row {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.t-flex-row-s {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
	}

	.content {
		box-sizing: border-box;
		background: #F6F3F3;
		min-width: 100vw;
		min-height: 100vh;
		padding-bottom: 30rpx;

		.t-goods {
			width: 100%;
			box-sizing: border-box;
			display: flex;
			flex-direction: row;
			flex-wrap: wrap;
			justify-content: space-between;
			align-items: flex-start;
			padding: 16rpx 18rpx 0rpx;
		}

		.t-goods-item {
			width: 350rpx;
			height: 576rpx;
			background: #fff;
			border-radius: 10rpx;
			margin-top: 14rpx;
		}

		.t-goods-img {
			width: 350rpx;
			height: 350rpx;
			border-top-left-radius: 10rpx;
			border-top-right-radius: 10rpx;
			display: block;
		}

		.t-goods-title {
			width: 308rpx;
			margin: 30rpx auto 0rpx;
			font-size: 28rpx;
			color: #272727;
		}

		.t-goods-score {
			margin-top: 16rpx;
			height: 32rpx;
			line-height: 32rpx;
			margin-left: 20rpx;
		}

		.t-goods-score text:first-child {
			font-size: 32rpx;
			color: #D41428;
			font-weight: bold;
		}

		.t-goods-score text:last-child {
			font-size: 28rpx;
			color: #17ba7a;
			margin-left: 4rpx;
		}

		.t-dh {
			width: 310rpx;
			height: 70rpx;
			background: #17ba7a;
			border-radius: 35rpx;
			font-size: 32rpx;
			color: #FFFFFF;
			margin: 20rpx auto 0rpx;

		}

		.t-more {
			font-size: 28rpx;
			color: #888888;
			line-height: 40rpx;
			margin-top: 50rpx;
			margin-bottom: 85rpx;
		}
	}
</style>